home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIFileUtilities.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  143 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIFileUtilities.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIFileUtilities_h__
  6. #define __gen_nsIFileUtilities_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nspluginroot_h__
  14. #include "nspluginroot.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. #include "nsplugindefs.h"
  22.  
  23. /* starting interface:    nsIFileUtilities */
  24. #define NS_IFILEUTILITIES_IID_STR "89a31ce0-019a-11d2-815b-006008119d7a"
  25.  
  26. #define NS_IFILEUTILITIES_IID \
  27.   {0x89a31ce0, 0x019a, 0x11d2, \
  28.     { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
  29.  
  30. /**
  31.  * The nsIFileUtilities interface provides access to random file operations.
  32.  * To obtain: QueryInterface on nsIPluginManager.
  33.  */
  34. class NS_NO_VTABLE nsIFileUtilities : public nsISupports {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEUTILITIES_IID)
  38.  
  39.   /**
  40.    * Returns the name of the browser executable program.
  41.    *
  42.    * @param aProgramPath - the returned path to the program
  43.    * @result             - NS_OK if this operation was successful
  44.    */
  45.   /* void getProgramPath (out constCharPtr aProgramPath); */
  46.   NS_IMETHOD GetProgramPath(const char * *aProgramPath) = 0;
  47.  
  48.   /**
  49.    * Returns the name of the temporary directory.
  50.    *
  51.    * @param aTempDirPath - the returned path to the temp directory
  52.    * @result             - NS_OK if this operation was successful
  53.    */
  54.   /* void getTempDirPath (out constCharPtr aTempDirPath); */
  55.   NS_IMETHOD GetTempDirPath(const char * *aTempDirPath) = 0;
  56.  
  57.   /**
  58.    * Returns a unique temporary file name.
  59.    *
  60.    * @param aPrefix - a string to prefix to the temporary file name
  61.    * @param aLength - the length of the resulting buffer to receive the data
  62.    * @param aBuffer - the returned temp file name
  63.    * @result        - NS_OK if this operation was successful
  64.    */
  65.   /* void newTempFileName (in string aPrefix, in unsigned long aLength, in charPtr aBuffer); */
  66.   NS_IMETHOD NewTempFileName(const char *aPrefix, PRUint32 aLength, char * aBuffer) = 0;
  67.  
  68. };
  69.  
  70. /* Use this macro when declaring classes that implement this interface. */
  71. #define NS_DECL_NSIFILEUTILITIES \
  72.   NS_IMETHOD GetProgramPath(const char * *aProgramPath); \
  73.   NS_IMETHOD GetTempDirPath(const char * *aTempDirPath); \
  74.   NS_IMETHOD NewTempFileName(const char *aPrefix, PRUint32 aLength, char * aBuffer); 
  75.  
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  77. #define NS_FORWARD_NSIFILEUTILITIES(_to) \
  78.   NS_IMETHOD GetProgramPath(const char * *aProgramPath) { return _to GetProgramPath(aProgramPath); } \
  79.   NS_IMETHOD GetTempDirPath(const char * *aTempDirPath) { return _to GetTempDirPath(aTempDirPath); } \
  80.   NS_IMETHOD NewTempFileName(const char *aPrefix, PRUint32 aLength, char * aBuffer) { return _to NewTempFileName(aPrefix, aLength, aBuffer); } 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  83. #define NS_FORWARD_SAFE_NSIFILEUTILITIES(_to) \
  84.   NS_IMETHOD GetProgramPath(const char * *aProgramPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProgramPath(aProgramPath); } \
  85.   NS_IMETHOD GetTempDirPath(const char * *aTempDirPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTempDirPath(aTempDirPath); } \
  86.   NS_IMETHOD NewTempFileName(const char *aPrefix, PRUint32 aLength, char * aBuffer) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewTempFileName(aPrefix, aLength, aBuffer); } 
  87.  
  88. #if 0
  89. /* Use the code below as a template for the implementation class for this interface. */
  90.  
  91. /* Header file */
  92. class nsFileUtilities : public nsIFileUtilities
  93. {
  94. public:
  95.   NS_DECL_ISUPPORTS
  96.   NS_DECL_NSIFILEUTILITIES
  97.  
  98.   nsFileUtilities();
  99.  
  100. private:
  101.   ~nsFileUtilities();
  102.  
  103. protected:
  104.   /* additional members */
  105. };
  106.  
  107. /* Implementation file */
  108. NS_IMPL_ISUPPORTS1(nsFileUtilities, nsIFileUtilities)
  109.  
  110. nsFileUtilities::nsFileUtilities()
  111. {
  112.   /* member initializers and constructor code */
  113. }
  114.  
  115. nsFileUtilities::~nsFileUtilities()
  116. {
  117.   /* destructor code */
  118. }
  119.  
  120. /* void getProgramPath (out constCharPtr aProgramPath); */
  121. NS_IMETHODIMP nsFileUtilities::GetProgramPath(const char * *aProgramPath)
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* void getTempDirPath (out constCharPtr aTempDirPath); */
  127. NS_IMETHODIMP nsFileUtilities::GetTempDirPath(const char * *aTempDirPath)
  128. {
  129.     return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131.  
  132. /* void newTempFileName (in string aPrefix, in unsigned long aLength, in charPtr aBuffer); */
  133. NS_IMETHODIMP nsFileUtilities::NewTempFileName(const char *aPrefix, PRUint32 aLength, char * aBuffer)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* End of implementation class template. */
  139. #endif
  140.  
  141.  
  142. #endif /* __gen_nsIFileUtilities_h__ */
  143.